home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_pow_battery_m.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
74 lines
# Jedi Knight MOTHS Cog Script
#
# POW_BATTERY_m.COG
#
# POWERUP Script - Battery
#
# [YB, CYW, SRS]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
thing sender local
int bin=13 local
sound pickupsnd=BactaPu1.wav local
sound respawnsnd=Activate01.wav local
flex amount local
message touched
message taken
message respawn
end
# ========================================================================================
code
touched:
player = GetSourceRef();
amount = GetInv(player, bin);
if (amount < GetInvMax(player, bin))
{
TakeItem(GetSenderRef(), -1);
call taken;
}
Return;
# ........................................................................................
taken:
powerup = GetSenderRef();
player = GetSourceRef();
// Print("Battery");
jkPrintUNIString(player, bin);
// Do effects.
PlaySoundLocal(pickupsnd, 1, 0, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
// Increment powerup amount.
ChangeInv(player, bin, 25.0);
SetInvAvailable(player, bin, 1);
Return;
# ........................................................................................
respawn:
PlaySoundThingLocal(respawnsnd, GetSenderRef(), 0.6, 5.0, 10.0, 0);
Return;
end